package cn.atzxc.qy.controller;

import cn.atzxc.qy.domain.ResponseResult;
import cn.atzxc.qy.domain.University;
import cn.atzxc.qy.service.UniversityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 大学实现控制
 */
@RestController
@RequestMapping("/user/college")
public class UniversityController {

    @Autowired
    private UniversityService universityService;

    /**
     * 获取所有学校的列表
     * @return
     */
    @GetMapping("/getCollegeList")
    public ResponseResult getCollegeList() {
        List<University> collegeList = universityService.getCollegeList();
        return new ResponseResult(200, "获取学校列表成功", collegeList);
    }


}
